package cn.jbit.ams;

import java.util.Timer;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import cn.jbit.ams.detection.TimeOrder;
import cn.jbit.ams.detection.TimeTask;

@SpringBootApplication
@MapperScan({"cn.jbit.ams.*.dao"})
public class AftersalesManagementSystemApplication {

	public static void main(String[] args) {
		SpringApplication.run(AftersalesManagementSystemApplication.class, args);
		 //创建定时器 
		Timer timer = new Timer(); 
		System.out.println("程序开始");
		//表示在3秒之后开始执行，并且每2秒执行一次 
		timer.schedule(new TimeTask(),1000*60*1000,1000*60*30);//每一个小时3600000检测一次
		timer.schedule(new TimeOrder(),1000*60*60*12,1000*60*60*13);
	}
}
